<?php 

class setting_models_edition extends CI_Model{
	public function __construct(){
		$this->load->database();
	}
	public function get_Edition($name=''){
		$where= array('code' => 'edition');
		if($name)$where['setting_key']=$name;
		$query = $this->db->get_where('settings',$where);
	 	return $query->result();
	}
	public function create($data){
		
		$data['code']= 'edition';
		$this->db->insert('settings', $data);
		
	}
	public function edit($data){
		if(!empty($data)){
				$where= array('id'=>$data['id']);
				
				$this->db->update('settings', $data,$where);
		}
		return false;
	}
}